#!/bin/sh
echo -e "\033[34m dotnet core runtime 树莓派自动安装脚本 \033[0m"
echo -e "\033[34m dotnet core runtime 修改包源 \033[0m"
sudo sed -i 's/raspbian.raspberrypi.org/mirrors.aliyun.com\/raspbian/' /etc/apt/sources.list
sudo apt-get update && apt-get upgrade -y 
echo -e "\033[34m dotnet core runtime 安装常用软件 \033[0m"
sudo apt-get install -y curl libunwind8 gettext libgdiplus nginx onboard sqlite3 fcitx fcitx-googlepinyin fcitx-module-cloudpinyin
sudo apt-get install -y fcitx-sunpinyin byobu superviosr
wget --no-check-certificate https://raw.githubusercontent.com/itemir/rpi_boat_utils/master/uart_control/uart_control
chmod +x uart_control & sudo ./uart_control gpio
wget https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.1/dotnet-runtime-latest-linux-arm.tar.gz
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet-runtime-latest-linux-arm.tar.gz -C /opt/dotnet && sudo rm dotnet-runtime-latest-linux-arm.tar.gz
wget https://download.microsoft.com/download/A/7/8/A78F1D25-8D5C-4411-B544-C7D527296D5E/aspnetcore-runtime-2.1.4-linux-arm.tar.gz
sudo tar zxf aspnetcore-runtime-2.1.4-linux-arm.tar.gz -C /opt/dotnet && sudo rm aspnetcore-runtime-2.1.4-linux-arm.tar.gz
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
pip install sqlite-web